/*
 * @Date: 2025-07-16 21:00:19
 * @LastEditTime: 2025-07-20 15:44:13
 */
// @ts-ignore
import LibGenerateTestUserSig from "../assets/libs/lib-generate-test-usersig-es.min.js";

// 判断当前设备是否是移动端
export const isMobile = () => {
  return /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
};

export const genTestUserSig = (options: any) => {
  const { SDKAppID, secretKey, userID } = options;
  const generator = new LibGenerateTestUserSig(SDKAppID, secretKey, 604800);
  const userSig = generator.genTestUserSig(userID);
  return {
    SDKAppID,
    userSig,
  };
};
